package lanqiao;

import java.util.Scanner;

public class 成绩统计 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = 0;//及格人数
        int j = 0;//优秀人数
        for (int i = 0; i < n ; i++) {
            int m = scan.nextInt();
            if (m<0 || m>100){
                break;
            }
            if (m>85){
                k++;
                j++;
            }
            if (60<=m && m<80){
                k++;
            }
        }
        System.out.println(Math.round((float) j*100/n)+"%");
        System.out.println(Math.round((float) k*100/n)+"%");
        scan.close();
    }

}
